{{#if getEntityDataTask.isRunning}}

  <div class="browse-viewport__loading">
    {{pendulum-ellipsis-animation}}
  </div>

{{else}}
  {{#if getEntityDataTask.last.isError}}

    {{empty-state
      heading="An error occurred getting entities"
      subHead=getEntityDataTask.last.error
    }}

  {{else}}
    {{browser/browser-viewport
      currentEntity=currentEntity
      entities=entities
      entityRoute=entityRoute
      getNextEntities=(action 'getNextEntities')
    }}

    {{#if remainingEntityCount}}
      {{#if getDatasetsTask.isRunning}}

        <div class="scroll-list-loading">
          <p class="scroll-list-loading__text">Loading {{nextCountSize}} more of {{total}}</p>
          {{pendulum-ellipsis-animation}}
        </div>

      {{else}}

        <div class="scroll-list-loading">
          <p class="scroll-list-loading__text">Showing {{entities.length}} datasets of {{total}}</p>
        </div>

      {{/if}}
    {{/if}}
  {{/if}}
{{/if}}
